import request from '@/utils/request'

// 创建物业投诉
export function createPropertyComplaints(data) {
  return request({
    url: '/ipark/property-complaints/create',
    method: 'post',
    data: data
  })
}

// 更新物业投诉
export function updatePropertyComplaints(data) {
  return request({
    url: '/ipark/property-complaints/update',
    method: 'put',
    data: data
  })
}

// 删除物业投诉
export function deletePropertyComplaints(id) {
  return request({
    url: '/ipark/property-complaints/delete?id=' + id,
    method: 'delete'
  })
}

// 获得物业投诉
export function getPropertyComplaints(id) {
  return request({
    url: '/ipark/property-complaints/get?id=' + id,
    method: 'get'
  })
}

// 获得物业投诉分页
export function getPropertyComplaintsPage(params) {
  return request({
    url: '/ipark/property-complaints/page',
    method: 'get',
    params
  })
}
// 导出物业投诉 Excel
export function exportPropertyComplaintsExcel(params) {
  return request({
    url: '/ipark/property-complaints/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}